<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class PwColonysModel extends Model {

    /*
	*返回参数 单条群组记录中的 图片地址
	*/
	 public function getIconByItem($item){
	    $img= "/pw8/images/g/groupnopic.gif";
	   if(!empty($item['icon']) && strpos($item['icon'],'/'))
	      $img="pw8/attachment/photo/".$item['icon'];
	   elseif(!empty($item['icon']))
	     $img="pw8/attachment/cn_img/".$item['icon'];
	   
	   $item['icon']=$img; 	 
	 } 
	 
	 /*
	 *返回 群组数组中图片地址
	 */
	 public function getIconByList($list){
	    foreach($list as &$li){
		    $this->getIconByItem($li);
	     }
	 } 
}
?>
